// pages/userCenter/server/server.js
const request = require('../../../utils/request')

Page({
  data: {
    configInfo: {}
  },

  onLoad() {
    this.getConfig()
  },

  getConfig() {
    wx.showLoading()
    request.get('config')
      .then(res => {
        wx.hideLoading()
        if (res.data) {
          this.setData({
            configInfo: res.data
          })
        }
      })
      .catch(error => {
        wx.showToast({
          icon: 'none',
          title: error.msg && error.msg
        })
      })
      .finally(_ => {
        
      })
  }
})